package com.zhuoyue.system.service.impl;

import com.zhuoyue.common.utils.DateUtils;
import com.zhuoyue.system.domain.TblDeviceZY;
import com.zhuoyue.system.mapper.TblDeviceZYMapper;
import com.zhuoyue.system.service.ITblDeviceZYService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * imageService业务层处理
 *
 * @author hewenze
 * @date 2020-08-21
 */
@Service
public class TblDeviceZYServiceImpl implements ITblDeviceZYService {
    @Autowired
    private TblDeviceZYMapper TblDeviceZYMapper;

    /**
     * 查询image
     *
     * @param id imageID
     * @return image
     */
    @Override
    public TblDeviceZY selectTblDeviceZYById(Long id) {
        return TblDeviceZYMapper.selectTblDeviceZYById(id);
    }

    /**
     * 查询image列表
     *
     * @param TblDeviceZY image
     * @return image
     */
    @Override
    public List<TblDeviceZY> selectTblDeviceZYList(TblDeviceZY TblDeviceZY) {
        return TblDeviceZYMapper.selectTblDeviceZYList(TblDeviceZY);
    }

    /**
     * 新增image
     *
     * @param TblDeviceZY image
     * @return 结果
     */
    @Override
    public int insertTblDeviceZY(TblDeviceZY TblDeviceZY) {
        TblDeviceZY.setCreateTime(DateUtils.getNowDate());
        return TblDeviceZYMapper.insertTblDeviceZY(TblDeviceZY);
    }

    /**
     * 修改image
     *
     * @param TblDeviceZY image
     * @return 结果
     */
    @Override
    public int updateTblDeviceZY(TblDeviceZY TblDeviceZY) {
        return TblDeviceZYMapper.updateTblDeviceZY(TblDeviceZY);
    }

    /**
     * 批量删除image
     *
     * @param ids 需要删除的imageID
     * @return 结果
     */
    @Override
    public int deleteTblDeviceZYByIds(Long[] ids) {
        return TblDeviceZYMapper.deleteTblDeviceZYByIds(ids);
    }

    /**
     * 删除image信息
     *
     * @param id imageID
     * @return 结果
     */
    @Override
    public int deleteTblDeviceZYById(Long id) {
        return TblDeviceZYMapper.deleteTblDeviceZYById(id);
    }
}
